package com.buer.storage.dao;

import com.buer.storage.dto.*;
import com.buer.storage.entity.Dorder;
import com.buer.storage.entity.Stock;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface DestroyDao {

    List<Stock> findStock();

    List<Dorder> selectByAll(Map<String, Object> map);

    int insertOrder(DeStorageDto deStorageDto);

    Stock queryBuerStockByParam(DestroydetailsDto outProd);

    int updateAwaitNum(Stock stock);

    int insertDetails(@Param(value="arrary") DestroydetailsDto[] destroyProds);

    List<DestroyDto> findDestroyAll(Map<String, Object> map);
    //查询入库表
    List<DeStorageAllDto> findOutAll(Integer destroyId);

    //List<DorderdetailsDto> queryOrderDetailInfoByOutId(Integer outId);

    //根据订单id删除商品信息
    int deleteOutStorageById(int destroyId);

    //根据商品表id删除商品信息
    int deleteDorderdetails(int deliveryId);

    void deleteDorderByOutId(Integer destroyId);
    void deleteDorderDetailsByOutId(Integer destroyId);

    Stock queryBuerStockByParam(DorderdetailsDto outProd);

    int updateAddSumStock(Stock stock);

    //void insertStock2(Dorderdetails putProd);
    //查询入库表

    DestroydetailsDto[] findOrderDetailInfoByOutId(Integer destroyId);

    DestroydetailsDto[] findDordertailsAll(Integer detailsId);

    int deleteStock(int stockId);
    int deleteStockDetails(int stockdetailsId);

    int updateStatus (int destroyId);
}
